<?php

use Illuminate\Support\Facades\Route;

Route::post('login', [\App\Http\Controllers\Admin\LoginController::class, 'dologin']);
Route::get('logout', [\App\Http\Controllers\Admin\LoginController::class, 'logout']);
Route::get('checktoken', [\App\Http\Controllers\Admin\IndexController::class, 'checkToken']);

Route::get('/webPath/lists', [\App\Http\Controllers\Admin\WebPathController::class, 'lists']);
Route::post('/get/config', [\App\Http\Controllers\Admin\Config\ConfigController::class, 'lists']);
Route::get('/get/version', [\App\Http\Controllers\Admin\Version\VersionController::class, 'getVersion']);
Route::get('/get/updatePackage', [\App\Http\Controllers\Admin\Version\VersionController::class, 'getUpdatePackage']);

Route::group(['middleware' => ['admin.guards']], function () {
    Route::any('/adminUsers/store', [\App\Http\Controllers\Admin\AdminUser\AdminUserController::class, 'store']);
    Route::any('/adminUsers/index', [\App\Http\Controllers\Admin\AdminUser\AdminUserController::class, 'index']);
});

Route::group(['prefix' => 'global'], function () {
    Route::get('reference', [\App\Http\Controllers\GlobalController::class, 'reference']);
});
